import { _decorator, Component, Node } from 'cc';
import { SkeletonGroundState } from './SkeletonGroundState';
import { StateDefine } from '../../Config';
const { ccclass, property } = _decorator;

@ccclass('SkeletonIdleState')
export class SkeletonIdleState extends SkeletonGroundState {
    onEnter() {
        
        super.onEnter();
        this.enemy.ZeroVelocity();
        this.stateTime = this.enemy.IdleTime;
    }
    onExit() {
        super.onExit();
    }
    update(deltaTime: number) {
        super.update(deltaTime);
        if (this.stateTime < 0) this.enemy.stateMgr.transit(StateDefine.SkeletonWalk);
    }
}


